package kp.rpc.registry.factory;

import kp.rpc.registry.EtcdRegistry;
import kp.rpc.registry.Registry;
import kp.rpc.spi.SpiLoader;

public class RegistryFactory {
    static {
        SpiLoader.load(Registry.class);
    }

    /**
     * @description: 默认注册中心
     */
    private final static Registry DEFAULT_REGISTRY = new EtcdRegistry();

    /**
     * @description: 获取注册中心
     */
    public static Registry getRegistry(String key) {
        return SpiLoader.getInstance(Registry.class, key);
    }

}
